1. Field of the Invention
The present invention relates to memory management of a computer system utilizing Intel Corporation microprocessors.
2. Description of the Prior Art
Many of the personal computers used today are based on the Intel Corporation's family of microprocessors, including the 8088, 8088-2, 8086, 80186 (hereinafter referred to collectively as the 8086), 80286 and 80386. It has been Intel's practice to maintain downward compatibility throughout its line of microprocessors, such that programs designed to run on the 8086 may generally run on the 80386 microprocessor. This is accomplished by maintaining a consistent core of microprocessor instructions throughout the family. However, the newer microprocessors, the 80286 and 80386, have expanded sets of instructions. The 80286 instruction set is a superset of the 8086 instruction set. Similarly, the 80386 instruction set is a superset of the 80286 instruction set.
However, this compatibility is not without its price. The 8086 microprocessor has several limitations. First, the 8086 does not support multi-tasking operations. Multi-tasking refers to a computer's ability to run more than one application at a single time or to run background operations while other tasks are being carried out. Second, the 8086 microprocessor is limited in Random Access Memory (RAM) capacity to 1 Mbyte of memory. As a practical matter, an 8086 is actually limited to 640 kbyte of RAM in personal computers compatible with the International Business Machine Corporation's (IBM) PC and using Microsoft Corporation's MS-DOS as an operating system because the range from 640 kbyte to 1 Mbyte is reserved for various additional devices and system memory. Further, the 8086 memory addresses generated by the various operating systems and applications programs represent the real or physical addresses in RAM memory, known as real mode operation.
With the introduction of the 80286, Intel introduced a new architecture which included memory management and protection techniques. These techniques permitted accessing memory addresses in excess of the 1 Mbyte 8086 limitation. Further, the architecture supported a protection technique which ensured that multi-tasking operations would be insulated from each other and would not access another task's data. This mode of operation is known as protected mode. Real mode and protected mode are mutually incompatible operational modes for Intel's microprocessors. The 80286 represents a significant improvement over the 8086 in terms of speed, capability and flexibility. However, when running 8086 programs, the 80286 runs in real mode and is subject to the very same limitations as the 8086.
Similarly, the 80386 microprocessor is capable of carrying out multi-tasking operations and accessing memory addresses as high as 4 Gbytes. However, when running 80286 and 8086 programs designed to run in real mode, it too acts as an 80286 or 8086 in real mode. Realizing this limitation, Intel introduced with the 80386 a mode known as 8086 virtual mode. The virtual mode supports the memory management and techniques normally utilized by the 80386 and permits 8086 virtual tasks to operate as part of a multi-tasking system. Thus, the 80386 is capable of running multiple 8086 virtual tasks accessing memory addresses in excess of the 1 Mbyte real limit, as well as protected mode 80286 and 80386 tasks.
However, it will be appreciated that during this evolution of the Intel microprocessor family that a number of instructions written specifically for the 8086 and 80286 were necessarily supported in the 80386. The reason for supporting these machine specific instructions is that operating systems or applications programs utilized these special commands as opposed to focusing on using the common core of commands.
One of these commands is an undocumented instruction known as the LOADALL command. The LOADALL command is designed to load all of the segment selector registers and segment descriptor caches from values stored in memory at physical address 800h (where the h suffix indicates hexadecimal notation). It was designed to be used primarily for Intel testing purposes. However, its ability to rapidly load all registers and descriptor caches with a single command resulted in its use by operating systems and several applications programs.
In 1988, Intel announced that it was discontinuing support for the 80386 LOADALL instruction and was going to remove it from the 80386 instruction set. This 80386 instruction was used to emulate the 80286 LOADALL instruction. Like the 80286 LOADALL instruction the 386 LOADALL was undocumented. However, it has not been widely used in application or operating system software. The reason given by Intel was that newer operating systems, such as Microsoft Corporation's OS/2, automatically determine the type of processor, would recognize an attempt to run an 80286 instruction on an 80386 and would generate a fault which would cause the operating system to run in 80286 mode as opposed to the faster 80386 mode.
At the time of the announcement, Intel suggested a technique which could be used to emulate the 286 LOADALL instruction. However, the technique did not address all the problems which might occur. The suggested emulation avoids the loading of illegal or invalid values in the segment selector flag fields by arbitrarily entering a valid code which modifies the selector privilege level to the highest level (0). However, the suggested technique for emulating the LOADALL instruction manipulates the protection scheme such that a general protection violation may occur. It will be appreciated that task data integrity is critical in any multi-tasking environment and that such protection errors cannot be tolerated.